let fs = require('fs');




exports.getLayer = async (ctx) => {
  // 返回成功响应
  ctx.status = 200;
  ctx.body = {
    data: {
      layers: fs.readFileSync('./layerstr', 'utf-8')
    }
  }
};
exports.setLayer = async (ctx) => {
  const params = ctx.request.body;
  let b64str = params.layers
  fs.writeFileSync('./layerstr', b64str, 'utf-8');
  // 返回成功响应
  ctx.status = 200;
  ctx.body = {
  }
};